package cloudInformation.service.impl;

import cloudEntity.dto.user.SmartUserExaminationPerformanceUpdateDTO;
import cloudEntity.entity.SmartExaminationPerformanceEntity;
import cloudInformation.covert.SmartExaminationPerformanceCovertInterFace;
import cloudInformation.mapper.SmartExaminationPerformanceMapper;
import cloudInformation.service.SmartExaminationPerformanceService;
import cn.hutool.core.date.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: Smart School
 * @ClassName SmartExaminationPerformanceServiceImpl
 * @description:
 * @author: 陈智博
 * @create: 2025-04-14 08:31
 * @Version 1.0
 **/
@Service
public class SmartExaminationPerformanceServiceImpl implements SmartExaminationPerformanceService {

    @Autowired
    private SmartExaminationPerformanceMapper smartExaminationPerformanceMapper;


    @Override
    public Integer updateSmartExaminationPerformance(SmartExaminationPerformanceEntity dto) {
        SmartUserExaminationPerformanceUpdateDTO smartUserExaminationPerformanceUpdateDTO = SmartExaminationPerformanceCovertInterFace.INTSANCE.SmartExaminationEntityCovertUpdateDTO(dto);
        smartUserExaminationPerformanceUpdateDTO.setSysExaminationPerformanceUpdateTime(DateTime.now());
        return smartExaminationPerformanceMapper.updateUserExaminationScore(smartUserExaminationPerformanceUpdateDTO);
    }
}
